Partial Public Class pages_payments_usercontrols_UCPayment : Inherits UserControl

#Region "Interface"
    Public Sub Display(ByVal [payment] As CPayment, page as CPaymentList, pi As CPagingInfo)
        If Parent.Controls.Count Mod 2 = 0 Then row.Attributes.Add("class", "alt_row")

        With [payment]
            litNumber.Text = CStr(page.IndexOf([payment]) + 1 + pi.PageIndex * pi.PageSize)

            lnkPaymentOrderId.Text = CUtilities.Timespan(.OrderCreated)
            lnkPaymentOrderId.NavigateUrl = CSitemap.Order(.PaymentOrderId)

            lnkCustomer.NavigateUrl = CSitemap.Payments(Nothing, .PaymentOrderId, Integer.MinValue, Integer.MinValue)

            litPaymentTxnId.Text = .PaymentTransaction
            litPaymentAmount.Text = CTextbox.SetMoney(.PaymentAmount)
            litPaymentFee.Text = CTextbox.SetMoney(.PaymentFee)
            litPaymentNet.Text = CTextbox.SetMoney(.PaymentNet)
            lnkPaymentCreated.Text = CUtilities.Timespan(.PaymentCreated)
            lnkPaymentCreated.ToolTip = .DetailsString
            lnkPaymentCreated.NavigateUrl = CSitemap.Payment(.PaymentId)

            lnkProduct.Text = .ProductName
            lnkProduct.NavigateUrl = CSitemap.ProductEdit(.OrderProductId)
            lnkProduct.NavigateUrl = CSitemap.Payments(Nothing, Integer.MinValue, Integer.MinValue, .OrderProductId)
            lnkCustomer.Text = .CustomerName
            lnkCustomer.ToolTip = .CustomerEmail
            ' lnkCustomer.NavigateUrl = CSitemap.Customer(.OrderCustomerId)
            lnkCustomer.NavigateUrl = CSitemap.Payments(Nothing, Integer.MinValue, .OrderCustomerId, Integer.MinValue)
            chkPaymentIsOk.Checked = .PaymentIsOk
            litPaymentCode.Text = .PaymentCode
            litPaymentFirstName.Text = .PaymentFirstName
            litPaymentLastName.Text = .PaymentLastName
            litPaymentItemName.Text = .PaymentItemName
            litPaymentMemo.Text = .PaymentMemo
            litPaymentCurrency.Text = .PaymentCurrency
            litCountry.Text = .Country
        End With
    End Sub
#End Region

End Class

